<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8" />
	<title>Add React in One Minute</title>
</head>

<body>

	<h2>Add React in One Minute</h2>
	<p>This page demonstrates using React with no build tooling.</p>
	<p>React is loaded as a script tag.</p>

	<!-- We will put our React component inside this div. -->
	<div id="root"></div>

	<!-- Load React. -->
	<!-- Note: when deploying, replace "development.js" with "production.min.js". -->
	<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
	<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>

	<!-- Load our React component. -->
	<script>

		const e = React.createElement;

		function Welcome(props) {
			return <h1>Hello, {props.name}</h1>;
		}
		class AddTodo extends React.Component {
			render() {
				return ( <div onClick={this.sayHi}> f</div>)
			}
			sayHi(){
				console.log('Hi~')
			}
		}
		class TODO extends React.Component {
			constructor(props) {
				super(props)
				this.state = {
					todos: []
				}
			}
			render() {
				return e(
					AddTodo
				)
			}
		}

		const domContainer = document.querySelector('#like_button_container');
		ReactDOM.render(e(TODO), domContainer);
	</script>

</body>

</html>